<?php
class HotelMapsForm extends Form
{
	function __construct(){
        Form::Form('HotelMapsForm');
                $this->link_css('style/jquery-ui-1.9.2.custom.css');
                $this->link_js('javascript/jquery/jquery-ui-1.9.2.custom.min.js');
                //
                $this->link_css("style/front-city-maps.css");
	}
	
	function draw()
	{
		global $display;
        $id = (int)Url::get('id');
        if($id){
            $this->hotel = Db_Hotel::getHotelById($id);
            if (!empty($this->hotel['map_img'])){
                $img = Db_Image::selectImages('img_name, img_url, img_server', '', "id =" . $this->hotel['map_img']);
                $display->add('map_img', $img[0]);
            }else{
                $display->add('map_img', 0);
            }
            $display->add('latitude', $this->hotel['latitude']);
            $display->add('longitude', $this->hotel['longitude']);
        }
        $display->output('HotelMaps');
    }
}
?>